package cosc617_blackteam;

/**
 * @author Laura
 * An enum associated with I_Tab decorators
 */
public enum SpecialOffer{
	PERCENT_OFF, COUPON;
	private boolean active = true; //whether the offer is active or not. starts false
	
	public boolean isActive(){
		return active;
	}
	
	public void setActive(boolean b){
		active = b;
	}
	
	/**
	 * @param tabToDecorate the tab to the associated decorator to
	 * @return the decorated tab
	 */
	public I_Tab applySpecialOffer(I_Tab tabToDecorate){
		switch(this){
			case PERCENT_OFF: return new PercentOffTabDecorator(tabToDecorate);
			case COUPON: return new CouponTabDecorator(tabToDecorate);
			default: return null;
		}
	}
	

	

}
